﻿using AutoMapper;
using SupplyChain.Domain.Entities;
using SupplyChain.Write.API.Application.Command.CustomerOrder;
using SupplyChain.Write.API.Application.Command.Goods;
using SupplyChain.Write.API.Application.Command.PurchaseOrder;
using SupplyChain.Write.API.Application.Command.Supplier;

namespace SupplyChain.Write.API.Config
{
    public class MappingProfile : Profile
    {
        public MappingProfile() 
        {
            CreateMap<PurchaseOrder, AddPurchaseOrderCommand>().ReverseMap();
            CreateMap<PurchaseCategory, AddPurchaseCategoryCommand>().ReverseMap();
            CreateMap<PurchaseCategory, UpdPurchaseCategoryCommand>().ReverseMap();

            CreateMap<SupplierProfile,AddSupplierProfileCommand>().ReverseMap();
            CreateMap<SupplierProfile,UpdSupplierProfileCommand>().ReverseMap();
            CreateMap<SupplierCategory, AddSupplierCategoryCommand>().ReverseMap();

            CreateMap<GoodsInfo, AddGoodsCommand>().ReverseMap();

            CreateMap<CustomerOrder, AddCustomerOrderCommand>().ReverseMap();
            CreateMap<ContractCategory, AddContractCategoryCommand>().ReverseMap();
            CreateMap<ContractCategory, UpdContractCategoryCommand>().ReverseMap();
        }
    }
}
